package com.leyou.page.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: guojy
 * @date: 2020/3/10 18:10
 * @Description:
 * @version: 1.0
 */
@Controller
public class Hellocontroller {
    @RequestMapping("/hello")
    public String hello(Model model) {
        model.addAttribute("message", "as");
        List<String> list = new ArrayList<>();
        list.add("a");
        list.add("b");
        list.add("c");
        list.add("d");
        model.addAttribute("list",list);
        return "hello";
    }
}
